#! /usr/bin/env python

PACKAGE='lsd_slam_viewer'
import roslib; roslib.load_manifest(PACKAGE)

#from driver_base.msg import SensorLevels
from dynamic_reconfigure.parameter_generator import *

gen = ParameterGenerator()

gen.add("showKFCameras", bool_t, 0, "Toggle Drawing of blue Keyframe Camera-Frustrums", True)
gen.add("showKFPointclouds", bool_t, 0, "Toggle Drawing of Pointclouds for all Keyframes", True)
gen.add("showConstraints", bool_t, 0, "Toggle Drawing of red/green Pose-Graph Constraints", True)
gen.add("showCurrentCamera", bool_t, 0, "Toggle Drawing of red Frustrum for the current Camera Pose", True)
gen.add("showCurrentPointcloud", bool_t, 0, "Toggle Drawing of the latest pointcloud added to the map", True)


gen.add("pointTesselation", double_t, 0, "Size of Points", 1, 0.0, 5)
gen.add("lineTesselation", double_t, 0, "Width of Lines", 1, 0.0, 5)
gen.add("scaledDepthVarTH", double_t, 0, "log10 of threshold on points variance, in the respective keyframes scale. ", -3, -10, 1)
gen.add("absDepthVarTH", double_t, 0, "log10 of threshold on points variance, in absolute scale.", -1, -10, 1)
gen.add("minNearSupport", int_t, 0, "only plot points that have #minNearSupport similar neighbours (higher values remove outliers)", 7, 0, 9)

gen.add("cutFirstNKf", int_t, 0, "do not display the first #cutFirstNKf keyframes pointclouds, to remove artifacts left-over from the random initialization.", 5, 0, 100)

gen.add("sparsifyFactor", int_t, 0, "only plot one out of #sparsifyFactor points, selected at random. Use this to significantly speed up rendering for large maps.", 1, 1, 100)


gen.add("saveAllVideo", bool_t, 0, "save all rendered images... only use if you know what you are doing.", False)
gen.add("keepInMemory", bool_t, 0, "If set to false, Pointcloud is only stored in OpenGL buffers, and not kept in RAM. This greatly reduces the required RAM for large maps, however also prohibits saving / dynamically changing sparsifyFactor and variance-thresholds.", True)


exit(gen.generate(PACKAGE, "Config", "LSDSLAMViewerParams"))

